import 'package:flutter/material.dart';
import 'package:x3_base_package/x3_base_package.dart';

import '../components/business_depot_clerk_item.dart';

class BusinessDepotClerk extends StatefulWidget {
  final String depotId;

  const BusinessDepotClerk({Key key, @required this.depotId}) : super(key: key);

  @override
  State<BusinessDepotClerk> createState() => _BusinessDepotClerkState();
}

class _BusinessDepotClerkState extends State<BusinessDepotClerk> with AutomaticKeepAliveClientMixin {
  @override
  bool get wantKeepAlive => true;

  @override
  Widget build(BuildContext context) {
    super.build(context);
    return buildListWidget();
  }

  Widget buildListWidget() {
    return BaseRefreshComponent(path: '/x3-service-vip-bills-center/vipbills/vipbillclerks/clerk/query', buildItem: buildListItemWidget);
  }

  Widget buildListItemWidget(Map<String, dynamic> item, int index) {
    return BusinessDepotClerkItem(item: item);
  }
}
